package com.ruoyi.truth.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.truth.mapper.QuanInfoMapper;
import com.ruoyi.truth.domain.QuanInfo;
import com.ruoyi.truth.service.IQuanInfoService;

/**
 * 企业经营数据Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-07-05
 */
@Service
public class QuanInfoServiceImpl implements IQuanInfoService 
{
    @Autowired
    private QuanInfoMapper quanInfoMapper;

    /**
     * 查询企业经营数据
     * 
     * @param quaninfoId 企业经营数据主键
     * @return 企业经营数据
     */
    @Override
    public QuanInfo selectQuanInfoByQuaninfoId(Long quaninfoId)
    {
        return quanInfoMapper.selectQuanInfoByQuaninfoId(quaninfoId);
    }

    /**
     * 查询企业经营数据列表
     * 
     * @param quanInfo 企业经营数据
     * @return 企业经营数据
     */
    @Override
    public List<QuanInfo> selectQuanInfoList(QuanInfo quanInfo)
    {
        return quanInfoMapper.selectQuanInfoList(quanInfo);
    }

    /**
     * 新增企业经营数据
     * 
     * @param quanInfo 企业经营数据
     * @return 结果
     */
    @Override
    public int insertQuanInfo(QuanInfo quanInfo)
    {
        quanInfo.setCreateTime(DateUtils.getNowDate());
        return quanInfoMapper.insertQuanInfo(quanInfo);
    }

    /**
     * 修改企业经营数据
     * 
     * @param quanInfo 企业经营数据
     * @return 结果
     */
    @Override
    public int updateQuanInfo(QuanInfo quanInfo)
    {
        quanInfo.setUpdateTime(DateUtils.getNowDate());
        return quanInfoMapper.updateQuanInfo(quanInfo);
    }

    /**
     * 批量删除企业经营数据
     * 
     * @param quaninfoIds 需要删除的企业经营数据主键
     * @return 结果
     */
    @Override
    public int deleteQuanInfoByQuaninfoIds(Long[] quaninfoIds)
    {
        return quanInfoMapper.deleteQuanInfoByQuaninfoIds(quaninfoIds);
    }

    /**
     * 删除企业经营数据信息
     * 
     * @param quaninfoId 企业经营数据主键
     * @return 结果
     */
    @Override
    public int deleteQuanInfoByQuaninfoId(Long quaninfoId)
    {
        return quanInfoMapper.deleteQuanInfoByQuaninfoId(quaninfoId);
    }
}
